


function fooStr(str){
    let pointer =0
    let temp = ''
    let result = []
    while(pointer <str.length){
        let i=pointer
        for(;i<str.length;i++){
            if(str[pointer] === str[i]){
                temp += str[i]
            }else{
                break
            }
        }
        result.push(temp)
        pointer = i
        temp = ''
    }
    return result
}

let str = '00011010011aaabbc大大家'
let result = fooStr(str)
console.log(result.toString())  // 000,11,0,1,00,11,aaa,bb,c